﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentValidation;

namespace App.Entity
{
    public class UserEntityValidator : AbstractValidator<UserEntity>
    {
        // 构造方法中编写验证规则
        public UserEntityValidator()
        {
            RuleFor(u => u.UserName).NotEmpty().Length(4, 32);
        }
    }
}
